import request from '@/utils/request'
// 普通商品佣金
export function getCommissionList({ keyword, is_serve, is_vip, page, second_cate_id }) {
  return request({
    url: '/back/vip/CommodityCommission',
    method: 'get',
    params: { keyword, is_serve, is_vip, type: 'list', page, second_cate_id }
  })
}
// 商品类目
export function getGoodsClassicList() {
  return request({
    url: '/back/shop/commodityKindSpec',
    method: 'get',
    params: { type: 'getKindAll' }
  })
}
// 设置普通商品佣金
export function setNormalRevenue({ id, myType, commonGoodsFirstCommission, commonGoodsSecondCommission }) {
  return request({
    url: '/back/vip/CommodityCommission',
    method: 'post',
    data: { type: 'set', id, myType, commonGoodsFirstCommission, commonGoodsSecondCommission }
  })
}
// 设置会员商品佣金
export function setVipRevenue({ id, myType, vipGoodsFirstCommission, vipGoodsSecondCommission }) {
  return request({
    url: '/back/vip/CommodityCommission',
    method: 'post',
    data: { type: 'setVipCommodityCommission', id, myType, vipGoodsFirstCommission, vipGoodsSecondCommission }
  })
}
